package com.casstime.ec.cloud.discount.restful;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.casstime.ec.cloud.discount.dao.business.SupplierGarageBusinessMapper;
import com.casstime.ec.cloud.service.GenericService;
import com.casstime.ec.cloud.service.SupplierGarageBusinessService;
import com.casstime.ec.cloud.values.business.SupplierGarageBusiness;

/**
 * ClassName: DiscountServiceImpl 
 * Function: (金额促销实现类)
 * Reason: ADD REASON(可选).
 *  
 * @author wu.chen 
 * 2018年2月26日 上午11:02:13
 * @version   
 * @since JDK 1.8
 */
@RestController
public class SupplierGarageBusinessServiceRest extends GenericService implements SupplierGarageBusinessService {
	
	@Autowired
	private SupplierGarageBusinessMapper supplierGarageBusinessMapper;
	
	@Override
	public int insertBusinessRecord(@RequestBody List<SupplierGarageBusiness> records) throws Exception {
		return supplierGarageBusinessMapper.insertSupplierGarageBusiness(records);
	}

	@Override
	public List<SupplierGarageBusiness> listSupplierGarageBusiness(@RequestParam("garageCompanyId") String garageCompanyId) throws Exception {
		return supplierGarageBusinessMapper.listSupplierGarageBusiness(garageCompanyId);
	}
	
	
}
